package model;

/**
 * Write a description of class OrderLine here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class OrderLine
{
    private int productQuantity;
    private Product pr;

    public OrderLine(Product pr, int productQuantity)
    {
        this.productQuantity = productQuantity;
        this.pr = pr;
    }

    public void setProductQuantity(int productQuantity)
    {
        if(pr.getAmount() > productQuantity)
        {
            this.productQuantity = productQuantity;
        }
    }
    public int getProductQuantity()
    {
        return productQuantity;
    }
    
    public Product getProduct()
    {
        return pr;
    }
    
    
}
